<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@include file="../../common/includeBaseSet.jsp" %>
<%@include file="../../common/includeSystemSet.jsp" %>
<%@include file="../../common/operation_forbid.jsp" %>
<%@include file="../../common/jsVersion.jsp" %>
<!DOCTYPE html >
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>收支管理</title>
    
</head>
<body>
	 <link rel="stylesheet" type="text/css"  href="${jypath}/static/ext/resources/ext-theme-gray/ext-theme-gray-all.css" />
     <script type="text/javascript" src="${jypath}/static/ext/ext-all.js"></script>
	 <script type="text/javascript" src="${jypath}/static/ext/locale/ext-lang-zh_CN.js"></script>
	 <script type="text/javascript" src="${jypath}/static/js/marketing/needReceiveRefund/needReceive.js?v=${jsVersion}"></script> 
	 <script type="text/javascript" src="${jypath}/static/js/marketing/haveReceiveRefund/haveReceive.js?v=${jsVersion}"></script> 
	 <script type="text/javascript" src="${jypath}/static/js/marketing/needReceiveRefund/needRefund.js?v=${jsVersion}"></script>
	 <script type="text/javascript" src="${jypath}/static/js/marketing/haveReceiveRefund/haveRefund.js?v=${jsVersion}"></script>
	 <script type="text/javascript" src="${jypath}/static/js/marketing/needReceiveRefund/needAdvance.js?v=${jsVersion}"></script>
	 <script type="text/javascript" src="${jypath}/static/js/marketing/haveReceiveRefund/haveAdvance.js?v=${jsVersion}"></script>
	 <script type="text/javascript" src="${jypath}/static/js/jquery/json2.js"></script> 
	 <script type="text/javascript">
	 	var idata = '${permitBtn}';
	 	var payDepositOff = ${payDepositOff};
	  	if(idata!=null||idata!=""){
			idata=JSON.parse(idata);
		}
	  	var finHaveReceivewWriteOff = true ; //冲销
	  	if(Ext.Array.contains(idata,"fin:haveReceive:writeOff")){
	  		finHaveReceivewWriteOff=false;
	  	}
	  	//换票
	  	var finHaveReceiveForTickets = true ; //换票
	  	if(Ext.Array.contains(idata,"fin:haveReceive:forTickets")){
	  		finHaveReceiveForTickets=false;
	  	}
	  	//退款
	  	var finHaveReceiveRefund = true ; //退款
	  	if(Ext.Array.contains(idata,"fin:haveReceive:refund")){
	  		finHaveReceiveRefund=false;
	  	}
	  	//延期收款
	  	var marketingDeferredPayment=true;
	  	if(Ext.Array.contains(idata,"fin:haveReceive:delayReceivables")){
	 		marketingDeferredPayment = false;
	 	}
	  	
	  	//待收款删除
	  	var dataRepairNeedReceiveDelete = true;
	  	if(Ext.Array.contains(idata,"data:repair:needReceiveDelete")){
	  		dataRepairNeedReceiveDelete = false;
	  	}
	  	//待收款/待退款导出
	 	var finNeedReceiveExport = true;
	  	if(Ext.Array.contains(idata,"fin:needReceive:export")){
	  		finNeedReceiveExport = false;
	  	}
	  	
	  	
		var finHaveReceiveExport = true;
	  	if(Ext.Array.contains(idata,"fin:haveReceive:export")){
	  		finHaveReceiveExport = false;
	  	}
	  	//结算时间变更
	  	var dataRepairHaveReceiveDate = true;
	  	if(Ext.Array.contains(idata,"data:repair:haveReceiveDate")){
	  		dataRepairHaveReceiveDate = false;
	  	}
	  	Array.prototype.del=function(n) {　//n表示第几项，从0开始算起。
			//prototype为对象原型，注意这里为对象增加自定义方法的方法。
			　if(n<0)　//如果n<0，则不进行任何操作。
				return this;
			　else
				return this.slice(0,n).concat(this.slice(n+1,this.length));
			/*
			　concat方法：返回一个新数组，这个新数组是由两个或更多数组组合而成的。
			　这里就是返回this.slice(0,n)/this.slice(n+1,this.length)
			 组成的新数组，这中间，刚好少了第n项。
			　slice方法： 返回一个数组的一段，两个参数，分别指定开始和结束的位置。
			*/
		}
	  		
	 Ext.onReady(function() {
		 var needReceive=Ext.create('component.marketing.needReceive');
		 var haveReceive=Ext.create('component.marketing.haveReceive');
		 var needRefund=Ext.create('component.marketing.needRefund');
		 var haveRefund=Ext.create('component.marketing.haveRefund');
         var needAdvance=Ext.create('component.marketing.needAdvance');
         var haveAdvance=Ext.create('component.marketing.haveAdvance');
		 var tabs2 = Ext.widget('tabpanel', {
		        renderTo: document.body,
		        activeTab: 0,
		        plain: true,
		        defaults :{
		            autoScroll: true,
		            bodyPadding: 10
		        },
		        items: [{
		        	    layout : 'fit',
		                title: '待收款明细',
		                items: needReceive
		            },{
		            	layout : 'fit',
		                title: '已收款明细',
		                items: haveReceive
		            },{
		            	layout : 'fit',
		                title: '待退款明细',
		                items: needRefund
		            },{
		            	layout : 'fit',
		                title: '已退款明细',
		                items: haveRefund
		            },{
						layout : 'fit',
						title: '待收垫付首期明细',
						items: needAdvance
					},{
						layout : 'fit',
						title: '已收垫付首期明细',
						items: haveAdvance
					}
		        ], 
                listeners:{ 
                    tabchange:function(tp,p){ 
                        
                    } 
                }
		    });
		 
	 })
	 </script>
</body>
</html>